<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.sundy.core.*"%>
<%@ page import="com.sundy.service.*"%>
<%@ page import="com.sundy.tools.*"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	Context context = Utility.obtainContext(request);
	List<DescriptTbl> list2 = (List<DescriptTbl>) request
			.getAttribute("lst2");
	request.setAttribute("title", "我的空间");
%>

<jsp:include page="/head.jsp" flush="true"></jsp:include>
<script type="text/javascript">
<!--
function check() {
  var pass1 = $.trim($("#pass1").val());
  var pass2 = $.trim($("#pass2").val());
  if (pass1 == "" || pass2 == "") {
    alert("请输入新密码");
    return false;
  }
  if (pass1 != pass2) {
    alert("您两次输入的密码不一致，请重新输入");
    return false;
  }
  return true;
}

$(document).ready(function() {
	$("#Tabs").tabs();
});
-->
</script>
<div id="mgr" class="center">
	<div style="height: 30px;">
		&nbsp;
	</div>
	<div id="Tabs">
		<ul>
			<li>
				<a href="#score-list">登分表列表</a>
			</li>
			<li>
				<a href="#set-pass">修改密码</a>
			</li>
		</ul>
		<div id="score-list">
			<table style="width: 100%; border: 1px solid #cccccc;">
				<tr>
					<td align="left">
						<%
							List<String> list = WebUtility.getTeacherSubjects(context
									.getCurrentUser());
							for (String str : list) {
								String[] strs = str.split("\\|");
						%>
						<a href="<%=path%>/mgr/score?id=<%=strs[1]%>&sub=<%=strs[2] %>"><%=strs[0]%></a>
						<br />
						<%
							}
						%>
					</td>
				</tr>
			</table>
		</div>
		<div id="set-pass">
			<table style="width: 100%; border: 1px solid #cccccc;">
				<form action="<%=request.getContextPath()%>/mgr/usrmgr"
					method="post" onsubmit="return check();">
					<input type="hidden" name="action" value="passmodify" />
					<tr>
						<td align="right">
							新密码
						</td>
						<td align="left">
							&nbsp;
							<input class="userinfo" id="pass1" name="pass1" type="password" />
						</td>
					</tr>
					<tr>
						<td align="right">
							确认新密码
						</td>
						<td align="left">
							&nbsp;
							<input class="userinfo" id="pass2" name="pass2" type="password" />
						</td>
					</tr>
					<tr>
						<td>
							&nbsp;
						</td>
						<td align="left">
							&nbsp;
							<input type="submit" value="修改" />
							&nbsp;
							<input type="reset" value="重置" />
						</td>
					</tr>
				</form>
			</table>
		</div>
	</div>
</div>
<jsp:include page="footer.jsp"></jsp:include>